﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Delivery.aspx.cs" Inherits="SalesManagement.Modules.Purchase.Delivery" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <ext:ResourceManager ID="ResourceManager1" runat="server" />
    <ext:Toolbar ID="Toolbar1" runat="server">
        <Items>
            <ext:ToolbarSpacer />
            <ext:Button ID="btnSave" runat="server" Text="Cập nhật" Icon="Tablesave">
                <DirectEvents>
                    <Click OnEvent="btnSaveExit_Click" />
                </DirectEvents>
            </ext:Button>
            <ext:Button ID="Button1" runat="server" Text="Lưu" Icon="Disk">
                <DirectEvents>
                    <Click OnEvent="btnSave_Click" />
                </DirectEvents>
            </ext:Button>
            <ext:Button ID="Button2" runat="server" Text="Thoát" Icon="Decline">
                <DirectEvents>
                    <Click OnEvent="btnExit_Click" />
                </DirectEvents>
            </ext:Button>
        </Items>
    </ext:Toolbar>
    <ext:Viewport ID="ViewPort1" runat="server">
        <Items>
            <ext:BorderLayout ID="BorderLayout1" runat="server">
                <North Margins-Top="30">
                    <ext:Panel ID="Panel2" runat="server" Frame="true" Height="170">
                        <Items>
                            <ext:FieldSet runat="server" Title="Thông tin phiếu" AutoHeight="true" LabelWidth="120"
                                Layout="Form">
                                <Items>
                                    <ext:CompositeField ID="CompositeField1" FieldLabel="Số phiếu" runat="server" MsgTarget="Under" AnchorHorizontal="-20">
                                        <Items>
                                            <ext:TextField ID="txtBondNo" runat="server" Width="100" />
                                            <ext:DisplayField ID="DisplayField2" runat="server" Text="Ngày (*)" />
                                            <ext:DateField ID="dateIn" runat="server" Width="100" />
                                            <ext:DisplayField ID="DisplayField3" runat="server" Text="Số hóa đơn" />
                                            <ext:TextField ID="txtBillNo" runat="server" Width="100" />
                                            <ext:DisplayField ID="DisplayField4" runat="server" Text="Chứng từ" />
                                            <ext:TextField ID="txtVoucher" runat="server" Width="100" />
                                        </Items>
                                    </ext:CompositeField>
                                    <ext:CompositeField ID="CompositeField2" FieldLabel="Chứng từ nhập" runat="server" MsgTarget="Under" AnchorHorizontal="-20">
                                        <Items>
                                            <ext:ComboBox ID="cbInputMethod" runat="server" Width="300" Editable="false" DataIndex="Title" />
                                            <ext:DisplayField ID="DisplayField6" runat="server" Text="Nhân viên" />
                                            <ext:ComboBox ID="cbEmployee" runat="server" Width="230" Editable="false" DataIndex="Title">
                                                <Items>
                                                    <ext:ListItem Text="Nguyễn Văn A" Value="hcm" />
                                                    <ext:ListItem Text="Nguyễn Văn B" Value="hn" />
                                                </Items>
                                                <SelectedItem Value="hcm" />
                                            </ext:ComboBox>
                                        </Items>
                                    </ext:CompositeField>
                                    <ext:ComboBox ID="cbSuppliers" FieldLabel="Nhà cung cấp" runat="server" Width="400"
                                        Editable="false" DataIndex="Title" />
                                    <ext:CompositeField ID="CompositeField5" FieldLabel="Địa chỉ" runat="server" MsgTarget="Under" AnchorHorizontal="-20">
                                        <Items>
                                            <ext:TextField ID="txtAddress" runat="server" Width="400" />
                                            <ext:DisplayField ID="DisplayField8" runat="server" Text="MST" />
                                            <ext:TextField ID="txtMST" runat="server" Width="100" />
                                        </Items>
                                    </ext:CompositeField>
                                    <ext:ComboBox ID="cbTimePay" FieldLabel="Kho xuất" runat="server" Width="300" Editable="false"
                                        DataIndex="Title">
                                        <Items>
                                            <ext:ListItem Text="Kho A" Value="hcm" />
                                            <ext:ListItem Text="Kho B" Value="hn" />
                                        </Items>
                                        <SelectedItem Value="hcm" />
                                    </ext:ComboBox>
                                </Items>
                            </ext:FieldSet>
                        </Items>
                    </ext:Panel>
               </North>
               <Center>
                    <ext:Panel ID="pnlSouth" runat="server" Layout="Fit">
                        <Items>
                            <ext:GridPanel ID="GridPanel2" runat="server" AutoExpandColumn="pro_Name" Border="false">
                                <Store>
                                    <ext:Store ID="Store2" runat="server">
                                        <Reader>
                                            <ext:JsonReader IDProperty="pro_id">
                                                <Fields>
                                                    <ext:RecordField Name="pro_id" />
                                                    <ext:RecordField Name="pro_Name" />
                                                    <ext:RecordField Name="pro_Unit" />
                                                    <ext:RecordField Name="pro_Amount" />
                                                    <ext:RecordField Name="pro_Price" />
                                                    <ext:RecordField Name="pro_VAT" />
                                                    <ext:RecordField Name="pro_Acounting" />
                                                    <ext:RecordField Name="pro_Total" />
                                                </Fields>
                                            </ext:JsonReader>
                                        </Reader>
                                    </ext:Store>
                                </Store>
                                <ColumnModel ID="ColumnModel2" runat="server">
                                    <Columns>
                                        <ext:Column ColumnID="pro_id" DataIndex="pro_id" Header="Mã hàng" />
                                        <ext:Column DataIndex="pro_Name" Header="Tên hàng" />
                                        <ext:Column DataIndex="pro_Unit" Header="Đơn vị tính" />
                                        <ext:Column DataIndex="pro_Amount" Header="Số lượng" />
                                        <ext:Column DataIndex="pro_Price" Header="Đơn giá" />
                                        <ext:Column DataIndex="pro_VAT" Header="VAT" />
                                        <ext:Column DataIndex="pro_Acounting" Header="Chiết khấu" />
                                        <ext:Column DataIndex="pro_Total" Header="Thành tiền" />
                                    </Columns>
                                </ColumnModel>
                                <BottomBar>
                                    <ext:PagingToolbar ID="PagingToolBar2" runat="server" PageSize="10" />
                                </BottomBar>
                                <LoadMask ShowMask="true" />
                            </ext:GridPanel>
                        </Items>
                    </ext:Panel>
               </Center>
            </ext:BorderLayout>
        </Items>
    </ext:Viewport>
    </form>
</body>
</html>
